<template>
	<MessageDialog ref="dialogRef" />
</template>

<script>
import { getCurrentInstance, onMounted, ref } from 'vue';
import MessageDialog from "../message-dialog/message-dialog.vue";

export default {
	components: {
		MessageDialog
	},
	setup() {
		const dialogRef = ref();
		onMounted(() => {
			getApp().globalData.setConfirm((mes, options) => {
				options = options || {};
				options.content = mes;
				dialogRef.value.setOptions(options);
			});
		});
		return {
			dialogRef
		};
	},
};
</script>

<style></style>
